/*
 * @Author: jiu yin
 * @Date: 2023-04-27 15:08:38
 * @LastEditTime: 2024-06-21 15:06:26
 * @LastEditors: jiu yin zhen jing
 * @FilePath: \studio-web-admin\src\router\routerArr.tsx
 * jiu
 */

import React from "react";
import lazyLoad from "@/router/utlis/lazy";
import { redirect } from "react-router-dom";
import Layout from "@/layout/index";

//icon 区域
import home from '@/assets/image/menuIcon/home.png'
import control from '@/assets/image/menuIcon/control.png'
import Order_issuing from '@/assets/image/menuIcon/Order_issuing.png'
import Entrance_ticket from '@/assets/image/menuIcon/Entrance_ticket.png'
import pico from '@/assets/image/menuIcon/pico.png'
import setting from '@/assets/image/menuIcon/setting.png'
import map_management from '@/assets/image/menuIcon/map_management.png'

//a  b  c  d   e f g h i

let routeArr = [
   {
      path: "/",
      element: <Layout />,
      meta: {
         name: "首页",
         icon: home,
      },
      children: [
         {
            path: "/",
            meta: {
               name: "首页",
               icon: home,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/home"))),
         },
         {
            path: "message",
            meta: {
               name: "消息中心",
               icon: home,
               hidden: true,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/message"))),
         },
         {
            path: "message/detail",
            meta: {
               name: "消息中心详情",
               icon: home,
               hidden: true,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/message/detail"))),
         },
         {
            path: "problem",
            meta: {
               name: "消息中心",
               icon: home,
               hidden: true,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/problem"))),
         },
         {
            path: "problem/detail",
            meta: {
               name: "消息中心详情",
               icon: home,
               hidden: true,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/problem/detail"))),
         },
      ],
   },
   {
      path: "/scene_studio",
      element: <Layout />,
      meta: {
         name: "场景播控",
         icon: control,
      },
      children: [
         {
            path: "scene_studio",
            meta: {
               name: "场景播控",
               icon:control,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/scene_studio"))),
         },
         {
            path: "scene_member_code",
            meta: {
               name: "场景设置",
               icon:control,
               hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/scene_member_code"))),
         },
      ],
   },
   {
      path: "/entrance",
      element: <Layout />,
      meta: {
         name: "入场票",
         icon:Entrance_ticket,
      },
      children: [
         {
            path: "entrance",
            meta: {
               name: "入场票",
               icon:Entrance_ticket,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/entrance"))),
         },

      ],
   },
   {
      path: "/ticket_order",
      element: <Layout />,
      meta: {
         name: "订单/出票",
         icon:Order_issuing,
      },
      children: [
         {
            path: "ticket_order",
            meta: {
               name: "订单/出票",
               icon: Order_issuing,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/ticket_order"))),
         },

      ],
   },
   {
      path: "/pico",
      element: <Layout />,
      meta: {
         name: "设备管理",
         icon: pico,
      },
      children: [
         {
            path: "pico",
            meta: {
               name: "设备管理",
               icon: pico,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/pico"))),
         },
         {
            path: "pico_detail",
            meta: {
               name: "设备管理详情",
               icon: pico,
               hidden: true,
               // tier: 2,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/pico/detail"))),
         },

      ],
   },
   {
      path: "/liveApp",
      element: <Layout />,
      meta: {
         name: "场景应用管理",
         icon: Order_issuing,
      },
      children: [
         {
            path: "liveApp",
            meta: {
               name: "场景应用管理",
               icon: Order_issuing,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/liveApp"))),
         },
         {
            path: "liveApp/detail",
            meta: {
               name: "场景应用管理详情",
               icon: pico,
               hidden: true,
               // tier: 2,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/liveApp/detail"))),
         },

      ],
   },
   {
      path: "/map_management",
      element: <Layout />,
      meta: {
         name: "地图管理",
         icon: map_management,
      },
      children: [
         {
            path: "map_management",
            meta: {
               name: "地图管理",
               icon: map_management,
               // hidden: true,
               tier: 1,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/map_management"))),
         },
         {
            path: "map_management/detail",
            meta: {
               name: "地图管理详情",
               icon: pico,
               hidden: true,
               // tier: 2,
               key: "ca",
            },
            element: lazyLoad(React.lazy(() => import("@/view/map_management/detail"))),
         },

      ],
   },
   {
      path: "/admin",
      element: <Layout />,
      meta: {
         name: "系统配置",
         icon: setting,
         key: "b",
      },
      children: [
         {
            path: "manualWebSocket",
            element: lazyLoad(React.lazy(() => import("@/view/manualWebSocket"))),
            meta: {
               name: "参数配置",
               icon: setting,
               key: "bc",
               tier: 1,
            },
         },
         // {
         //    path: "role",
         //    element: lazyLoad(React.lazy(() => import("@/view/adminRole"))),
         //    meta: {
         //       name: "admin角色设置",
         //       icon: setting,
         //       key: "bc",
         //       tier: 1,
         //    },
         // },
         // {
         //    path: "user",
         //    element: lazyLoad(React.lazy(() => import("@/view/adminUser"))),
         //    meta: {
         //       name: "admin账号管理",
         //       icon: setting,
         //       key: "bd",
         //       tier: 1,
         //    },
         // },
      ],
   },
];

export default routeArr;
